package com.design03_behavioral.pattern13_observer.example03;

import com.design03_behavioral.pattern13_observer.example02.DrawHouseService;
import com.design03_behavioral.pattern13_observer.example02.LotteryResult;

import java.util.Date;

/**
 * @ClassName LotteryServiceImpl
 * @Description TODO
 * @Author zhangjunhao
 * @DATE 2023/9/6 22:44
 */
public class LotteryServiceImpl extends LotteryService {

    private DrawHouseService houseService =new DrawHouseService();


    @Override
    protected LotteryResult lottery(String uId) {
        //摇号
        String lots = houseService.lots(uId);

        return new LotteryResult(uId,lots,new Date());
    }
}
